function showEdit(num){
		var liList = document.getElementById("stockList").getElementsByTagName("li");
		var isSelf = false;
		for(var i = 0; i < liList.length; i++){
			var li = liList[i];
			if(li.getElementsByTagName("div")[0]){
				isSelf = true;
				li.removeChild(li.getElementsByTagName("div")[0]);
			}
		}

		if(!isSelf){
			var index = document.getElementById("category").selectedIndex
			var category = "A";
			if(index != -1){
				category = document.getElementById("category").getElementsByTagName("option")[index].value;
			}
			var li = liList[num - 1];
			var num = li.getElementsByTagName("td")[4].title;
			var liDiv = document.createElement("div")
			liDiv.style.width = "120px";
			liDiv.className = "editStock";
			liDiv.style.display = "block";
			liDiv.innerHTML = "<ul><form action='admin-editStock.htm' method='post'><input type='hidden' value='" + category + "' name='category' /><input type='hidden' value='" + num + "' name='id' /><li>股票名:</li><li><input type='text'  value='' class='input' name='stockName'/></li><li>股票代号：</li><li><input type='text'  value='' class='input' name='stockNum'/></li><li><input type='submit' value='提交更改' /></li></form></ul>";
			li.appendChild(liDiv)
		}
	}

	function deleteStock(num){
		var liList = document.getElementById("stockList").getElementsByTagName("li");
		var li = liList[num - 1];
		var num = li.getElementsByTagName("td")[4].title;
		var index = document.getElementById("category").selectedIndex
		var category = "A";
		if(index != -1){
			category = document.getElementById("category").getElementsByTagName("option")[index].value
		}
			
		if(confirm("确认删除？")){
			var form = document.createElement("form")
			form.action = "admin-deleteStock.htm"
			form.method = "post"
			form.innerHTML = "<input type='hidden' value='" + num + "' name='id' /><input type='hidden' value='" + category + "' name='category' />";
			form.submit();
		}
	}